package com.kang.controller;

import com.kang.commons.Result;
import com.kang.dto.RoleMenusDto;
import com.kang.service.RoleMenusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: service
 * @description:
 * @author: K.faWu
 * @create: 2022-03-03 16:32
 **/

@RestController
@RequestMapping("roleMenu")
public class RoleMenusController {
    private final RoleMenusService roleMenusService;

    public RoleMenusController(RoleMenusService roleMenusService) {
        this.roleMenusService = roleMenusService;
    }

    @PostMapping
    public Result<?> update(@RequestBody RoleMenusDto roleMenusDto){
        roleMenusService.update(roleMenusDto);
        return Result.success();
    }
}
